package com.wyz.web.mapper;


import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.wyz.common.po.UserPO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

@Mapper
public interface UserRepository extends BaseMapper<UserPO> {
    /**
     * 增/减账户的余额
     * @param id
     * @param money
     */
    void updateAsset(@Param("id")int id, @Param("money")double money);



    /**
     * 根据 username 获取 用户id
     * @Param username
     * @return id
     */
    Long getIdByUsername(String username);

    /**
     * 根据 用户id 获取 username
     * @Param id
     * @return username
     */
    String getUsernameById(long useId);
}
